import axiosInstance from "@/utils/request";

/**
 * 登录接口基础地址
 */
enum Api {
    ADMIN_BASE_URL = '/login/admin',
    STUDENT_BASE_URL = '/login/student',
    LOGIN_ADMIN_URL = `${ADMIN_BASE_URL}/loginSystem`,
    LOGIN_STUDENT_URL = `${STUDENT_BASE_URL}/loginSystem`,
}

/**
 * 登录
 * @param params 参数
 */
export const adminLogin = (params: any) => {
    return axiosInstance({
        url: Api.LOGIN_ADMIN_URL,
        method: 'post',
        data: params
    })
}

/**
 * 学生登录
 * @param params 参数
 */
export const studentLogin = (params: any) => {
    return axiosInstance({
        url: Api.LOGIN_STUDENT_URL,
        method: 'post',
        data: params
    })
}
